package com.example.presentshopping.ui.activity

import android.content.Intent
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import androidx.fragment.app.Fragment
import com.example.presentshopping.R
import com.example.presentshopping.config.base.BaseMvpActivity
import com.example.presentshopping.mvp.presenter.PublicPresenter
import com.example.presentshopping.net.http.HttpRequest
import com.example.presentshopping.net.http.HttpURL
import com.example.presentshopping.ui.fragment.earnings.GiftMoneyFragment
import kotlinx.android.synthetic.main.activity_gift_money.*


class GiftMoneyActivity : BaseMvpActivity() {
    private val strTitle = arrayOf("昨日礼币","今日礼币")


    override val layoutId: Int
        get() = R.layout.activity_gift_money

    override fun initView(savedInstanceState: Bundle?) {
        title_main_tv.leftBackImageTv.setOnClickListener { finish() }
        val pageViews = ArrayList<Fragment>()
        pageViews.add(GiftMoneyFragment(this,"1"))
        pageViews.add(GiftMoneyFragment(this,"2"))

        tablat.setViewPager(SpecialViewPager,strTitle,this,pageViews)
        iv_share2.setOnClickListener {
            val initx = Intent(this,BalanceChangeActivity().javaClass)
            initx.putExtra("url" , HttpURL.Req_blockChange)
            initx.putExtra("telie" , "兑换余额")
            startActivity(initx)  }
    }

    override fun onDestroy() {
        super.onDestroy()
    }


    override fun showToast(msg: String?) {

    }

    override fun onSuccess(data: String?) {

    }

    override fun onFailure(e: Throwable?, code: Int, msg: String?, isNetWorkError: Boolean) {

    }
}



